﻿<%@ Page Title="Cadastro de Módulo" Language="C#" MasterPageFile="~/Site.Master"
    AutoEventWireup="true" CodeBehind="CadastroModulo.aspx.cs" Inherits="GerTestes.Cadastros.CadastroModulo" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">
        .style1
        {
            width: 100%;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:Panel ID="pnlProjetos" runat="server">
        <div class="row">
            <div class="col-lg-12">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <h2>
                            <br />
                            <i class="fa fa-align-justify"></i><span class="break">Consulta Projetos</h2>
                        <div class="panel-actions">
                            <a href="table.html#" class="btn-minimize"><i class="fa fa-chevron-up"></i></a>
                        </div>
                        <div class="panel-actions">
                            <div style="margin-right: 20px; margin-top: 2.5px;">
                                <asp:TextBox ID="TxtPesquisaGrid" ClientIDMode="Static" CssClass="pesquisa" Width="250px"
                                    placeholder="Localizar..." runat="server" AutoPostBack="True" MaxLength="50"></asp:TextBox>
                            </div>
                        </div>
                    </div>
                    <div class="panel-body">
                        <asp:GridView ID="gvwProjetos" ClientIDMode="Static" runat="server" CssClass="table table-bordered table-striped table-condensed gridDinamica"
                            EmptyDataText="Registros não localizados..." AutoGenerateColumns="False" Width="100%"
                            role="grid" aria-describedby="DataTables_Table_0_info" OnRowDataBound="gvwProjetos_RowDataBound"
                            GridLines="None" DataKeyNames="ID_PROJETO" PageSize="100" OnSelectedIndexChanged="gvwProjetos_SelectedIndexChanged">
                            <Columns>
                                <asp:CommandField ButtonType="Image" SelectImageUrl="~/assets/img/selecionar.png"
                                    ShowSelectButton="True">
                                    <ItemStyle Width="25px" />
                                </asp:CommandField>
                                <asp:BoundField DataField="DESCRICAO" HeaderText="Projeto">
                                    <ItemStyle HorizontalAlign="Left" Width="98%" />
                                </asp:BoundField>
                                <asp:TemplateField HeaderText="Situação">
                                    <ItemTemplate>
                                        <asp:Image ID="imgStatus" runat="server" Height="25px" Width="25px" />
                                    </ItemTemplate>
                                    <ItemStyle HorizontalAlign="Center" />
                                </asp:TemplateField>
                                <asp:BoundField DataField="ATIVO" HeaderText="Status">
                                    <ItemStyle HorizontalAlign="Center" Width="2%" />
                                </asp:BoundField>
                            </Columns>
                            <PagerStyle CssClass="pagination" Wrap="True" />
                            <SelectedRowStyle CssClass="alert alert-info" Font-Bold="True" />
                        </asp:GridView>
                    </div>
                </div>
            </div>
        </div>
        </span>
    </asp:Panel>
    <asp:Panel ID="pnlModulos" runat="server" Visible="false">
        <div class="row">
            <div class="col-lg-12">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <h2>
                            <br />
                            <i class="fa fa-align-justify"></i><span class="break">Módulos x Projeto</h2>
                        <div class="panel-actions">
                            <a href="table.html#" class="btn-minimize"><i class="fa fa-chevron-up"></i></a>
                        </div>
                        <div class="panel-actions">
                            <div style="margin-right: 20px; margin-top: 2.5px;">
                            </div>
                        </div>
                    </div>
                    <div class="panel-body">
                        <asp:GridView ID="gvwModulos" ClientIDMode="Static" runat="server" CssClass="table table-bordered table-striped table-condensed"
                            EmptyDataText="Registros não localizados..." AutoGenerateColumns="False" Width="100%"
                            role="grid" aria-describedby="DataTables_Table_0_info" GridLines="None" DataKeyNames="ID_MODULO"
                            PageSize="100" OnRowCommand="gvwModulos_RowCommand" OnRowCreated="gvwModulos_RowCreated"
                            OnRowDataBound="gvwModulos_RowDataBound">
                            <Columns>
                                <asp:TemplateField HeaderText="Editar" ShowHeader="False">
                                    <ItemTemplate>
                                        <abbr title="Editar módulo!">
                                            <asp:ImageButton ID="ImgAlterar" runat="server" CausesValidation="false" CommandName="Alterar"
                                                ImageUrl="~/assets/img/edit.png" Text="Alterar" Width="25px" />
                                        </abbr>
                                    </ItemTemplate>
                                    <HeaderStyle HorizontalAlign="Center" Width="1%" />
                                    <ItemStyle HorizontalAlign="Center" Width="1%" />
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Excluir" ShowHeader="False">
                                    <ItemTemplate>
                                        <abbr title="Excluir módulo!">
                                            <asp:ImageButton ID="ImgExcluir" runat="server" CausesValidation="false" CommandName="Excluir"
                                                ImageUrl="~/assets/img/delete.png" OnClientClick="return ShowConfirm('Tem certeza que deseja excluir?', this.ID);"
                                                Text="Excluir" Width="25px" />
                                        </abbr>
                                    </ItemTemplate>
                                    <HeaderStyle HorizontalAlign="Center" Width="1%" />
                                    <ItemStyle HorizontalAlign="Center" Width="1%" />
                                </asp:TemplateField>
                                <asp:BoundField DataField="DESCRICAO" HeaderText="Módulo">
                                    <ItemStyle HorizontalAlign="Left" Width="98%" />
                                </asp:BoundField>
                                <asp:TemplateField HeaderText="Situação">
                                    <ItemTemplate>
                                        <asp:Image ID="imgStatus" runat="server" Height="25px" Width="25px" />
                                    </ItemTemplate>
                                    <ItemStyle HorizontalAlign="Center" />
                                </asp:TemplateField>
                                <asp:BoundField DataField="ATIVO" HeaderText="Status">
                                    <ItemStyle HorizontalAlign="Center" Width="2%" />
                                </asp:BoundField>
                            </Columns>
                            <PagerStyle CssClass="pagination" Wrap="True" />
                            <SelectedRowStyle CssClass="alert alert-info" Font-Bold="True" />
                        </asp:GridView>
                        <br />
                        <asp:Button ID="btnIncluir" runat="server" Text="Incluir Módulo" OnClick="btnIncluir_Click" />
                    </div>
                </div>
            </div>
        </div>
        </span>
    </asp:Panel>
    <asp:Panel ID="pnlEdicao" runat="server" Visible="False">
        <div class="row">
            <div class="col-lg-12">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <h2>
                            <br />
                            <i class="fa fa-align-justify"></i><span class="break">
                                <asp:Label ID="lblDescricaoPnlEdicao" runat="server" Text="Inclusão de Módulo"></asp:Label></h2>
                        <div class="panel-actions">
                            <a href="table.html#" class="btn-minimize"><i class="fa fa-chevron-up"></i></a>
                        </div>
                    </div>
                    <div class="panel-body">
                        <div>
                            <table class="style1">
                                <tr>
                                    <td>
                                        <asp:Label ID="Label2" runat="server" Text="Descrição"></asp:Label>
                                        <br />
                                        <asp:TextBox ID="TxtDescricao" required runat="server" Width="300px" MaxLength="150"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <asp:CheckBox ID="ChkAtivo" runat="server" Text="Ativo?" />
                                    </td>
                                </tr>
                            </table>
                            <asp:Button ID="btnConfirmar" runat="server" Text="Confirmar" OnClick="btnConfirmar_Click" />
                            <asp:Button ID="btnCancelar" runat="server" formnovalidate Text="Cancelar" OnClick="btnCancelar_Click" />
                        </div>
                    </div>
                </div>
            </div>
        </div>
        </span>
    </asp:Panel>
</asp:Content>
